package com.duoduo.admin.api.feign;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import com.duoduo.admin.api.dto.SysOauthClientDetailsDTO;
import com.duoduo.common.core.constant.SecurityConstants;
import com.duoduo.common.core.constant.ServiceNameConstants;
import com.duoduo.common.core.util.R;

@FeignClient(path="/sysOauthClientDetails",contextId = "rRemoteClientDetailsFeginClient", value = ServiceNameConstants.ADMIN_SERVICE)
public interface RemoteClientDetailsFeginClient {
	/**
	 * 通过clientId 查询客户端信息
	 * @param clientId 用户名
	 * @return R
	 */
	@GetMapping(value = "/getClientDetailsById/{clientId}", headers = SecurityConstants.HEADER_FROM_IN)
	R<SysOauthClientDetailsDTO> getClientDetailsById(@PathVariable("clientId") String clientId);

	/**
	 * 查询全部客户端
	 * @return R
	 */
	@GetMapping(value = "/list", headers = SecurityConstants.HEADER_FROM_IN)
	R<List<SysOauthClientDetailsDTO>> listClientDetails();

}
